using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HFK.DxFluentUI.VerticalGrid;
using HFK.DxFluentUI.Utility;
using HFK.DxFluentUIGUITest.Dummy;
using HFK.DxFluentUIGUITest.Dummy.DataObjects;
using DevExpress.XtraEditors;
using DevExpress.XtraVerticalGrid;

namespace HFK.DxFluentUIGUITest.VerticalGridControl
{
  public partial class VerticalGridControlTestForm : DevExpress.XtraEditors.XtraForm
  {
    public VerticalGridControlTestForm()
    {
      InitializeComponent();

      VerticalGridFullFeatured verticalgrid = new VerticalGridFullFeatured();

      VGridControl control = verticalgrid.Get;
      control.Dock = DockStyle.Fill;

      this.Controls.Add(control);

      List<SomeData> data = new List<SomeData>();
      data.Add(new SomeData() { IntValue = 1, Subdata = new SomeSubdata() { Submember = "S1" }, ChildData = new SingleHopClass() { DhcProperty = new DualHopClass() { ThcProperty = new TripleHopClass() { StringProperty = "THC1" } } } });
      data.Add(new SomeData() { IntValue = 2, Subdata = new SomeSubdata() { Submember = "S2" } });
      data.Add(new SomeData() { IntValue = 3, Subdata = new SomeSubdata() { Submember = "S3" } });
      data.Add(new SomeData() { IntValue = 4, Subdata = new SomeSubdata() { Submember = "S4" } });

      control.DataSource = verticalgrid.Data(data);
    }
  }
}